package com.owen.rabbitmq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.PostConstruct;

@SpringBootApplication
public class RabbitMQServerApplication {

    @Autowired
    private Tut3Sender tut3Sender;

    @PostConstruct
    public void init(){
        new Thread(tut3Sender).start();
    }

    public static void main(String[] args) {
        SpringApplication.run(RabbitMQServerApplication.class,args);
    }
}
